<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateCarpoollistTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_id}" for="id" />
                    <h:inputText id="id" value="#{carpoollistController.selected.id}" title="#{bundle.CreateCarpoollistTitle_id}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_interes}" for="interes" />
                    <h:inputText id="interes" value="#{carpoollistController.selected.interes}" title="#{bundle.CreateCarpoollistTitle_interes}" />
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_costo}" for="costo" />
                    <h:inputText id="costo" value="#{carpoollistController.selected.costo}" title="#{bundle.CreateCarpoollistTitle_costo}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_costo}"/>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_email}" for="email" />
                    <h:inputText id="email" value="#{carpoollistController.selected.email}" title="#{bundle.CreateCarpoollistTitle_email}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_maximo}" for="maximo" />
                    <h:inputText id="maximo" value="#{carpoollistController.selected.maximo}" title="#{bundle.CreateCarpoollistTitle_maximo}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_maximo}"/>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_zona}" for="zona" />
                    <h:selectOneMenu id="zona" value="#{carpoollistController.selected.zona}" title="#{bundle.CreateCarpoollistTitle_zona}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_zona}">
                        <f:selectItems value="#{zonaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_horario}" for="horario" />
                    <h:selectOneMenu id="horario" value="#{carpoollistController.selected.horario}" title="#{bundle.CreateCarpoollistTitle_horario}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_horario}">
                        <f:selectItems value="#{horarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateCarpoollistLabel_dia}" for="dia" />
                    <h:selectOneMenu id="dia" value="#{carpoollistController.selected.dia}" title="#{bundle.CreateCarpoollistTitle_dia}" required="true" requiredMessage="#{bundle.CreateCarpoollistRequiredMessage_dia}">
                        <f:selectItems value="#{diaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{carpoollistController.create}" value="#{bundle.CreateCarpoollistSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{carpoollistController.prepareList}" value="#{bundle.CreateCarpoollistShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateCarpoollistIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
